
<?php
function query($query)
{
    $connection = mysql_connect('localhost','root','vertrigo');
    mysql_select_db('docs',$connection);
    mysql_query('SET NAMES UTF-8', $connection);
    $ret = mysql_query($query,$connection);
    $data=array();
    while($row =  mysql_fetch_assoc($ret)){
        $data[] = $row;
    }
    return $data;
}
?>